<template>
  <div>姓名:
    <!-- 自组件绑定到slot标签上的属相，会提供给父组件的作用域插槽 -->
    <slot :info="{ fname:firstName, lname:lastName }">{{ firstName +' '+ lastName }}</slot>
  </div>
</template>

<script>
export default {
  props: {
    firstName: {
      type: String,
      default: ''
    },
    lastName: {
      type: String,
      default: ''
    }
  }
}
</script>
